package com.springboot.cloud.demos.feign.service;

import com.springboot.cloud.common.core.entity.vo.Result;
import com.springboot.cloud.demos.entity.form.FollowForm;
import com.springboot.cloud.demos.entity.param.FollowQueryParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(name = "ribbon-consumer", fallback = FollowServiceFallback.class)
public interface FollowService {

    @RequestMapping(value = "/follow", method = RequestMethod.POST)
    Result save(@RequestBody FollowForm followForm);

    @RequestMapping(value = "/follow", method = RequestMethod.PUT)
    Result update(@RequestBody FollowForm followForm);

    @RequestMapping(value = "/follow/getFollow", method = RequestMethod.GET)
    Result getFollow(@RequestParam("userId") String userId, @RequestParam("followUserId") String followUserId);

    @RequestMapping(value = "/follow/deleteByMap", method = RequestMethod.DELETE)
    Result deleteByMap(@RequestBody  FollowQueryParam queryParam);
}
